﻿package mortal.game.resource.tableConfig
{
    import com.gengine.resource.*;
    import flash.utils.*;

    public class ProxyConfig extends Object
    {
        private var _map:Dictionary;
        private static var _instance:ProxyConfig;

        public function ProxyConfig()
        {
            this._map = new Dictionary();
            if (_instance != null)
            {
                throw new Error(" BossConfig 单例 ");
            }
            this.init();
            return;
        }// end function

        private function init() : void
        {
            var _loc_1:* = ConfigManager.instance.getJSONByFileName("t_proxy.json");
            this.write(_loc_1);
            return;
        }// end function

        private function write(param1:Object) : void
        {
            var _loc_2:Object = null;
            for each (_loc_2 in param1)
            {
                
                this._map[_loc_2.proxyId] = _loc_2;
            }
            return;
        }// end function

        public function getProxyName(param1:int) : String
        {
            var _loc_2:* = this._map[param1];
            if (_loc_2)
            {
                return _loc_2.proxyNameShow;
            }
            return param1.toString();
        }// end function

        public static function get instance() : ProxyConfig
        {
            if (_instance == null)
            {
                _instance = new ProxyConfig;
            }
            return _instance;
        }// end function

    }
}
